Using profiles
Profiles allow you to create from a single Kanzi Studio project a set of kzb files and Kanzi applications that differ only in certain parts.
Profile Inheritance
Profiles can inherit from several profiles. Each profile has an ordered list of parent profiles:
- Kanzi Studio first looks up the value for a property from the active profile.
- If Kanzi Studio cannot find the value, it goes through the parent profiles and picks the value from the first parent profile that defines the value. Therefore the first profiles on the parent list take precedence over those that came later.
- If Kanzi Studio cannot find the value in any of the parent profiles, it gets the value from the Root profile.
This enables a convenient way to reuse the settings in the profiles. For example, if you use two pairs of profiles: High-end and Low-end profiles, and Tegra and IMG binary shader profiles. Using the profile inheritance you can create a High-end Tegra profile by creating a new profile and making it inherit the High-end and Tegra profiles.
Creating different versions of your application from the same Kanzi Studio project
To create different versions of your application from the same Kanzi Studio project:
- Create your project using the default <Root Profile>.
- When you are done creating the project, in the Library right-click Profiles and select Create Profile.
- In the Properties set:
- Either enable or disable the Abstract property:
- When disabled it uses this profile when exporting your application.
- When enabled it uses this profile only as a parent profile of other profiles.
- Parent Profiles to the profiles you want to use as parent profiles for this profile. See Profile Inheritance.
- Target Graphics API to the graphics API you want to use when you export your application with this profile
- Binary File Name to the name you want Kanzi Studio to save the .kzb when you export your application with this profile
- In the Profile toolbar set Edit Profile property to the profile you just created.
Now all the changes you make in your project are used only in the profile you seelected in the Edit Profile.
- Make the changes to your project to reflect the differences you need to make between different versions of your application. The values you set for these properties are used only in this profile.
Kanzi Studio uses the following formatting conventions for property names:
- Underline. You cannot change the property between profiles.
- Italics. These properties and objects are the same as in the Root profile.
- Regular typeface. The values of these properties differ from the values of the properties in the Root profile.
- Regular typeface or underline. Used for all properties when you select the Root profile.
- To see the differences between the <Root Profile> and your current profile, in the Project open the drop-down menu next to the search box and select
.
- Select > Export KZB Binary.
Kanzi Studio creates .kzb binaries of your project for all the profiles you defined in the project.
Using different online shaders for different hardware platforms
To use different online shaders for different hardware platforms:
- Create a profile and activate it by selecting it in the Profile toolbar in the Edit Profile property. See Creating different versions of your application from the same Kanzi Studio project.
- In the Context Resources select the material type for which you want to use different online shaders.
The materials show only the properties that the material type specifies for the active profile.
- Double-click either the vertex or the fragment shader.
Kanzi Studio creates a new shader file for the active profile and opens the Shader Source Editor. See Editing shaders.
- Edit the shader to meet the requirements of your target hardware platform for the profile you selected.
If the new shader requires different inputs, you can configure the property types of the material type for the active profile.
See also
Profiles
Editing shaders
Open topic with navigation